<?php
namespace frontend\widgets\banner;
use yii;
use yii\bootstrap\Widget;
class BannerWidget extends Widget{
    public $item = [];
    public function init()
    {
        if(empty($this->item)){
            $this->item = [
                ['label'=>'demo','image_url'=>'/statics/images/banner/b_0.png','url'=>['site/index'],'html'=>'','active'=>'active'],
                ['label'=>'demo','image_url'=>'/statics/images/banner/b_1.png','url'=>['site/index'],'html'=>'',],
                ['label'=>'demo','image_url'=>'/statics/images/banner/b_2.png','url'=>['site/index'],'html'=>'',],
            ];
        }
    }

    public function run()
    {
        $data['items'] = $this->item;
        return $this->render('index',['data'=>$data]);
    }



}